package pro.shushi.pamirs.demo.api.model;

import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;
import pro.shushi.pamirs.meta.base.common.CodeModel;
import pro.shushi.pamirs.user.api.model.PamirsUser;

@Model.model(DemoItemCategory.MODEL_MODEL)
@Model(displayName = "测试商品类目", labelFields = "name")
public class DemoItemCategory extends IdModel {

    private static final long serialVersionUID = 5626273740800455515L;

    public static final String MODEL_MODEL = "demo.DemoItemCategory";

    @Field.String
    @Field(displayName = "名称")
    private String name;

    @Field.Integer
    @Field(displayName = "排序")
    private Integer orderNum;

    @Field.String
    @Field(displayName = "父类目编码")
    private String parentId;

    @Field.many2one
    @Field.Relation(relationFields = {"parentId"}, referenceFields = {"id"})
    @Field(displayName = "父类目")
    private DemoItemCategory parent;
}
